//函数防抖
function debounce(func, time) {
    let timer = null;
    return function (e) {
        if (timer) {
            clearTimeout(timer)
        }
        timer = setTimeout(() => {
            func(e);
            time = null;
        }, time)
    }
}
export { debounce }